package com.norra.base.utils

import android.app.Activity
import android.content.Context
import android.content.pm.PackageManager
import androidx.core.app.ActivityCompat

class PermissionUtils {
    companion object {
        fun hasPermission(context: Context, permission: String): Boolean {
            return ActivityCompat.checkSelfPermission(context, permission) == PackageManager.PERMISSION_GRANTED
        }

        fun canRequestPermission(context: Activity, permission: String): Boolean {
            return ActivityCompat.shouldShowRequestPermissionRationale(context, permission)
        }
    }
}